package com.nian.service.impl;

import com.nian.dao.ProductDao;
import com.nian.dao.impl.ProductDaoImpl;
import com.nian.pojo.Product;
import com.nian.service.ProductService;

import java.util.List;

public class ProductServiceImpl implements ProductService {
    ProductDao productDao = new ProductDaoImpl();

    @Override
    public boolean addProduct(Product product) {
        return productDao.addProduct(product);
    }

    @Override
    public boolean dlProduct(Product product) {
        return productDao.dlProduct(product);
    }

    @Override
    public boolean reProduct(Product product) {
        return productDao.reProduct(product);
    }

    @Override
    public Product selectProductById(Product product) {
        return productDao.selectProductById(product);
    }

    @Override
    public Product selectProductByName(Product product) {
        return productDao.selectProductByName(product);
    }

    @Override
    public List<Product> selectAllProduct() {
        return productDao.selectAllProduct();
    }

}
